package com.demo.react.config;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.demo.react.interceptor.AuthorInterceptor;

//已经在总config配置，这里取消
//@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		// 对来自/** 这个链接来的请求进行拦截
		registry.addInterceptor(new AuthorInterceptor()).addPathPatterns("/**");
	}
}
